<template>
  <div>
    <div class="radios-box">
      <el-radio-group v-model="tabIndex" @change="jumpInfo">
        <el-radio-button :label="1" name="1">车辆基本信息</el-radio-button>
        <el-radio-button :label="2" name="2">部门员工信息</el-radio-button>
      </el-radio-group>
    </div>
    <div style="padding:10px 50px 30px">
      <el-row>
        <el-col :span="24">
          <div style="margin: 20px 0 30px">
            <el-button :disabled="!$store.getters.pageAuth.authoritySearch" size="mini" @click="search">搜索</el-button>
            <el-button :disabled="!$store.getters.pageAuth.authorityAdd" size="mini" @click="add">增加</el-button>
            <el-button :disabled="!$store.getters.pageAuth.authoritySearch" size="mini" @click="refresh">重置</el-button>
          </div>
          <el-table
            :data="staffSearchObj"
            :border="true"
            :header-cell-style="{background:'#eef1f6',color:'#606266'}"
            class="customTableStyle"
            style="font-size:12px;">
            <el-table-column
              type="index"
              label="序号"
              min-width="80"/>
            <el-table-column
              label="部门"
              min-width="100">
              <template slot-scope="scope">
                <el-select size="mini" clearable v-model="scope.row.bm" placeholder="请选择">
                  <el-option
                    v-for="item in deptList"
                    :key="item.id"
                    :label="item.bmmc"
                    :value="item.bmmc">
                  </el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column
              label="小组"
              min-width="100">
              <template slot-scope="scope">
                <el-select size="mini" clearable v-model="scope.row.xz" placeholder="请选择">
                  <el-option
                    v-for="item in teamList"
                    :key="item.id"
                    :label="item.xzmc"
                    :value="item.xzmc">
                  </el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column
              label="姓名"
              min-width="80">
              <template slot-scope="scope">
                <el-input size="mini" v-model="scope.row.xm" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="年龄"
              min-width="60">
              <template slot-scope="scope">
                <el-input type="number" size="mini" v-model="scope.row.nl" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="职务/职责"
              min-width="100">
              <template slot-scope="scope">
                <el-input size="mini" v-model="scope.row.zwzz" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="身份证号"
              min-width="160">
              <template slot-scope="scope">
                <el-input size="mini" v-model="scope.row.sfzh" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="身份证有效截止日期"
              min-width="180">
              <template slot-scope="scope">
                <el-date-picker
                  size="mini"
                  clearable
                  v-model="scope.row.sfzyxjzrq[0]"
                  value-format="yyyy-M-d"
                  type="date"
                  class="datePicker"
                  placeholder="开始日期">
                </el-date-picker>
                <el-date-picker
                  size="mini"
                  clearable
                  v-model="scope.row.sfzyxjzrq[1]"
                  value-format="yyyy-M-d"
                  type="date"
                  class="datePicker"
                  placeholder="结束日期">
                </el-date-picker>
              </template>
            </el-table-column>
            <el-table-column
              label="住址"
              min-width="140">
              <template slot-scope="scope">
                <el-input size="mini" v-model="scope.row.zz" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="联系电话"
              min-width="120">
              <template slot-scope="scope">
                <el-input type="number" size="mini" v-model="scope.row.lxdh" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="入职日期"
              min-width="180">
              <template slot-scope="scope">
                <el-date-picker
                  size="mini"
                  clearable
                  v-model="scope.row.rzrq[0]"
                  value-format="yyyy-M-d"
                  type="date"
                  class="datePicker"
                  placeholder="开始日期">
                </el-date-picker>
                <el-date-picker
                  size="mini"
                  clearable
                  v-model="scope.row.rzrq[1]"
                  value-format="yyyy-M-d"
                  type="date"
                  class="datePicker"
                  placeholder="结束日期">
                </el-date-picker>
              </template>
            </el-table-column>
            <el-table-column
              label="从业资格证编号"
              min-width="150">
              <template slot-scope="scope">
                <el-input size="mini" v-model="scope.row.cyzgzbh" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="从业资格证有效截止日期"
              min-width="180">
              <template slot-scope="scope">
                <el-date-picker
                  size="mini"
                  clearable
                  v-model="scope.row.cyzgzyxjzrq[0]"
                  value-format="yyyy-M-d"
                  type="date"
                  class="datePicker"
                  placeholder="开始日期">
                </el-date-picker>
                <el-date-picker
                  size="mini"
                  clearable
                  v-model="scope.row.cyzgzyxjzrq[1]"
                  value-format="yyyy-M-d"
                  type="date"
                  class="datePicker"
                  placeholder="结束日期">
                </el-date-picker>
              </template>
            </el-table-column>
            <el-table-column
              label="档案编号"
              min-width="150">
              <template slot-scope="scope">
                <el-input size="mini" v-model="scope.row.dabh" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="准驾车型"
              min-width="80">
              <template slot-scope="scope">
                <el-input size="mini" v-model="scope.row.zjcx" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="驾驶证初次领证日期"
              min-width="180">
              <template slot-scope="scope">
                <el-date-picker
                  size="mini"
                  clearable
                  v-model="scope.row.jszcclzrq[0]"
                  value-format="yyyy-M-d"
                  type="date"
                  class="datePicker"
                  placeholder="开始日期">
                </el-date-picker>
                <el-date-picker
                  size="mini"
                  clearable
                  v-model="scope.row.jszcclzrq[1]"
                  value-format="yyyy-M-d"
                  type="date"
                  class="datePicker"
                  placeholder="结束日期">
                </el-date-picker>
              </template>
            </el-table-column>
            <el-table-column
              label="驾驶证有效截止日期"
              min-width="180">
              <template slot-scope="scope">
                <el-date-picker
                  size="mini"
                  clearable
                  v-model="scope.row.jszyxjzrq[0]"
                  value-format="yyyy-M-d"
                  type="date"
                  class="datePicker"
                  placeholder="开始日期">
                </el-date-picker>
                <el-date-picker
                  size="mini"
                  clearable
                  v-model="scope.row.jszyxjzrq[1]"
                  value-format="yyyy-M-d"
                  type="date"
                  class="datePicker"
                  placeholder="结束日期">
                </el-date-picker>
              </template>
            </el-table-column>
            <el-table-column
              label="是否备案"
              min-width="80">
              <template slot-scope="scope">
                <el-select size="mini" clearable v-model="scope.row.sfba" placeholder="请选择">
                  <el-option
                    label="是"
                    value="是">
                  </el-option>
                  <el-option
                    label="否"
                    value="否">
                  </el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column
              label="备案车辆"
              min-width="120">
              <template slot-scope="scope">
                <el-input size="mini" v-model="scope.row.bacl" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="备注"
              min-width="120">
              <template slot-scope="scope">
                <el-input size="mini" v-model="scope.row.bz" placeholder="请输入内容"></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              min-width="220">
              <template slot-scope="scope">
              </template>
            </el-table-column>
          </el-table>
          <el-pagination
            :total="page.totalCount"
            :page-size="page.pageSize"
            :current-page.sync="page.currPage"
            style="margin-top: 10px;"
            background
            layout="total, slot, prev, pager, next"
            @current-change="search">
            <span>—&nbsp;&nbsp;&nbsp;共 {{page.totalPage}} 页</span>
          </el-pagination>
          <el-table
            :data="page.list"
            :border="true"
            :header-cell-style="{background:'#eef1f6',color:'#606266'}"
            highlight-current-row
            @row-click="rowClick"
            class="customTableStyle"
            style="font-size:12px;">
            <el-table-column
              type="index"
              label="序号"
              min-width="80"/>
            <el-table-column
              label="部门"
              min-width="100">
              <template slot-scope="scope">
                {{ scope.row.bm }}
              </template>
            </el-table-column>
            <el-table-column
              label="小组"
              min-width="100">
              <template slot-scope="scope">
                {{ scope.row.xz }}
              </template>
            </el-table-column>
            <el-table-column
              label="姓名"
              min-width="80">
              <template slot-scope="scope">
                {{ scope.row.xm }}
              </template>
            </el-table-column>
            <el-table-column
              label="年龄"
              min-width="60">
              <template slot-scope="scope">
                {{ scope.row.nl }}
              </template>
            </el-table-column>
            <el-table-column
              label="职务/职责"
              min-width="100">
              <template slot-scope="scope">
                {{ scope.row.zwzz }}
              </template>
            </el-table-column>
            <el-table-column
              label="身份证号"
              min-width="160">
              <template slot-scope="scope">
                {{ scope.row.sfzh }}
              </template>
            </el-table-column>
            <el-table-column
              label="身份证有效截止日期"
              min-width="180">
              <template slot-scope="scope">
                {{ scope.row.sfzyxjzrq }}
              </template>
            </el-table-column>
            <el-table-column
              label="住址"
              min-width="140">
              <template slot-scope="scope">
                {{ scope.row.zz }}
              </template>
            </el-table-column>
            <el-table-column
              label="联系电话"
              min-width="120">
              <template slot-scope="scope">
                {{ scope.row.lxdh }}
              </template>
            </el-table-column>
            <el-table-column
              label="入职日期"
              min-width="180">
              <template slot-scope="scope">
                {{ scope.row.rzrq }}
              </template>
            </el-table-column>
            <el-table-column
              label="从业资格证编号"
              min-width="150">
              <template slot-scope="scope">
                {{ scope.row.cyzgzbh }}
              </template>
            </el-table-column>
            <el-table-column
              label="从业资格证有效截止日期"
              min-width="180">
              <template slot-scope="scope">
                {{ scope.row.cyzgzyxjzrq }}
              </template>
            </el-table-column>
            <el-table-column
              label="档案编号"
              min-width="150">
              <template slot-scope="scope">
                {{ scope.row.dabh }}
              </template>
            </el-table-column>
            <el-table-column
              label="准驾车型"
              min-width="80">
              <template slot-scope="scope">
                {{ scope.row.zjcx }}
              </template>
            </el-table-column>
            <el-table-column
              label="驾驶证初次领证日期"
              min-width="180">
              <template slot-scope="scope">
                {{ scope.row.jszcclzrq }}
              </template>
            </el-table-column>
            <el-table-column
              label="驾驶证有效截止日期"
              min-width="180">
              <template slot-scope="scope">
                {{ scope.row.jszyxjzrq }}
              </template>
            </el-table-column>
            <el-table-column
              label="是否备案"
              min-width="80">
              <template slot-scope="scope">
                {{ scope.row.sfba }}
              </template>
            </el-table-column>
            <el-table-column
              label="备案车辆"
              min-width="120">
              <template slot-scope="scope">
                {{ scope.row.bacl }}
              </template>
            </el-table-column>
            <el-table-column
              label="备注"
              min-width="120">
              <template slot-scope="scope">
                {{ scope.row.bz }}
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              min-width="220">
              <template slot-scope="scope">
                <el-button :disabled="!$store.getters.pageAuth.authorityUpdate" size="mini" @click="edit(scope.row)">修改</el-button>
                <el-button :disabled="!$store.getters.pageAuth.authorityDelete" size="mini" @click="deleteClick(scope.row.id)">删除</el-button>
              </template>
            </el-table-column>
          </el-table>
          
        </el-col>
      </el-row>
      <div v-if="activeStaff.id">
        <!-- <el-row>
          <el-col :span="24">
            <el-row>
              <div class="car-detail-title">
                驾驶证及车辆备案信息
              </div>
              <el-form :inline="true" class="demo-form-inline">
                <el-col :span="8">
                  <el-form-item label="准驾车型">
                    {{ activeStaff.zjcx }}
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="驾驶证初次领证日期">
                    {{ activeStaff.jszcclzrq }}
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="驾驶证有效期">
                    {{ activeStaff.jszyxq }}
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="是否备案">
                    {{ activeStaff.sfba }}
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="备案车辆">
                    {{ activeStaff.bacl }}
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="备注">
                    {{ activeStaff.bz }}
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
          </el-col>
        </el-row> -->
        <div v-if="activeStaff.id">
          <el-row>
            <el-col :span="24">
              <el-row>
                <div class="upload-scrollcontainer">
                  <div class="upload-scrollbox" :style="{width: (activeImgList.length+1) * 160 + 'px'}">
                    <div class="upload-container">
                      <imgUpload :id="activeStaff.id" type="staff" @success="getImgList"/>
                    </div>
                    <div v-for="(item, index) in activeImgList" :key="item.path" class="upload-container">
                      <div class="upload-title">{{index +1}}&nbsp;&nbsp;{{ item.bz }}</div>
                      <div class="upload-pic-box">
                        <img :src="item.path" alt="" @click="$imageViewer">
                      </div>
                      <i class="el-icon-delete upload-del" @click.stop="imgDel(item.name)"></i>
                    </div>
                  </div>
                </div>
              </el-row>
            </el-col>
          </el-row>
        </div>
      </div>
      <el-dialog :visible.sync="addVisi"  width="70%" class="addstaffinfo">
        <el-row>
          <el-col :span="24">
            <el-form :label-position="'right'" size="mini" label-width="auto" :rules="rules" ref="addStaff" :model="addStaff">
              <el-row>
                <el-col :span="8">
                  <el-form-item label="部门" label-width="100px" prop="bm">
                    <el-select v-model="addStaff.bm" placeholder="请选择">
                      <el-option
                        v-for="item in deptList"
                        :key="item.id"
                        :label="item.bmmc"
                        :value="item.bmmc">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="小组" label-width="100px">
                    <el-select v-model="addStaff.xz" placeholder="请选择">
                      <el-option
                        v-for="item in teamList"
                        :key="item.id"
                        :label="item.xzmc"
                        :value="item.xzmc">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="姓名" label-width="100px" prop="xm">
                    <el-input v-model="addStaff.xm"/>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="年龄" label-width="100px">
                    <el-input v-model="addStaff.nl"/>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="职务/职责" label-width="100px">
                    <el-input v-model="addStaff.zwzz"/>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="联系电话" label-width="100px" prop="lxdh">
                    <el-input v-model="addStaff.lxdh"/>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="住址" label-width="180px">
                    <el-input v-model="addStaff.zz"/>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="入职日期" label-width="180px" prop="rzrq">
                    <el-date-picker
                      v-model="addStaff.rzrq"
                      value-format="yyyy-M-d"
                      type="date"
                      placeholder="选择日期">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="身份证号" label-width="180px" prop="sfzh">
                    <el-input v-model="addStaff.sfzh"/>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="身份证有效截止日期" label-width="180px" prop="sfzyxjzrq">
                    <el-date-picker
                      v-model="addStaff.sfzyxjzrq"
                      value-format="yyyy-M-d"
                      type="date"
                      placeholder="选择日期">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="从业资格证编号" label-width="180px" prop="cyzgzbh">
                    <el-input v-model="addStaff.cyzgzbh"/>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="从业资格证有效截止日期" prop="cyzgzyxjzrq" label-width="180px">
                    <el-date-picker
                      v-model="addStaff.cyzgzyxjzrq"
                      value-format="yyyy-M-dd"
                      type="date"
                      placeholder="选择日期">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="准驾车型" label-width="180px">
                    <el-input v-model="addStaff.zjcx"/>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="驾驶证初次领证日期" label-width="180px">
                    <el-date-picker
                      v-model="addStaff.jszcclzrq"
                      value-format="yyyy-M-d"
                      type="date"
                      placeholder="选择日期">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="档案编号" label-width="180px">
                    <el-input v-model="addStaff.dabh"/>
                  </el-form-item>
                </el-col>
                
                <el-col :span="12">
                  <el-form-item label="驾驶证有效截止日期" prop="jszyxjzrq"  label-width="180px">
                    <el-date-picker
                      v-model="addStaff.jszyxjzrq"
                      value-format="yyyy-M-dd"
                      type="date"
                      placeholder="选择日期">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="是否备案" label-width="100px">
                    <el-input v-model="addStaff.sfba"/>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="备案车辆" label-width="100px">
                    <el-input v-model="addStaff.bacl"/>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="备注" label-width="100px">
                    <el-input v-model="addStaff.bz"/>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <el-col>
                  <div style="over-flow: hidden">
                    <el-button style="float: right;margin-right:10px" size="mini" @click="addClick">增加</el-button>
                  </div>
                </el-col>
              </el-row>
            </el-form>
          </el-col>
        </el-row>
      </el-dialog>
      <el-dialog :visible.sync="editVisi"  width="70%"  class="addstaffinfo">
        <el-row>
          <el-col :span="24">
            <el-form :label-position="'right'" size="mini" label-width="auto" :rules="rules" ref="editStaff" :model="editStaff">
              <el-row>
                <el-col :span="8">
                  <el-form-item label="部门" label-width="100px" prop="bm">
                    <el-select v-model="editStaff.bm" placeholder="请选择">
                      <el-option
                        v-for="item in deptList"
                        :key="item.id"
                        :label="item.bmmc"
                        :value="item.bmmc">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="小组" label-width="100px">
                    <el-select v-model="editStaff.xz" placeholder="请选择">
                      <el-option
                        v-for="item in teamList"
                        :key="item.id"
                        :label="item.xzmc"
                        :value="item.xzmc">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="姓名" label-width="100px" prop="xm">
                    <el-input v-model="editStaff.xm"/>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="年龄" label-width="100px">
                    <el-input v-model="editStaff.nl"/>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="职务/职责" label-width="100px">
                    <el-input v-model="editStaff.zwzz"/>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="联系电话" label-width="100px" prop="lxdh">
                    <el-input v-model="editStaff.lxdh"/>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="住址" label-width="180px">
                    <el-input v-model="editStaff.zz"/>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="入职日期" label-width="180px" prop="rzrq">
                    <el-date-picker
                      v-model="editStaff.rzrq"
                      value-format="yyyy-M-d"
                      type="date"
                      placeholder="选择日期">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="身份证号" label-width="180px" prop="sfzh">
                    <el-input v-model="editStaff.sfzh"/>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="身份证有效截止日期" label-width="180px" prop="sfzyxjzrq">
                    <el-date-picker
                      v-model="editStaff.sfzyxjzrq"
                      value-format="yyyy-M-d"
                      type="date"
                      placeholder="选择日期">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="从业资格证编号" label-width="180px" prop="cyzgzbh">
                    <el-input v-model="editStaff.cyzgzbh"/>
                  </el-form-item>
                </el-col> 
                <el-col :span="12">
                  <el-form-item label="从业资格证有效截止日期" prop="cyzgzyxjzrq"  label-width="180px">
                    <el-date-picker
                      v-model="editStaff.cyzgzyxjzrq"
                      value-format="yyyy-M-dd"
                      type="date"
                      placeholder="选择日期">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="准驾车型" label-width="180px">
                    <el-input v-model="editStaff.zjcx"/>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="驾驶证初次领证日期" label-width="180px">
                    <el-date-picker
                      v-model="editStaff.jszcclzrq"
                      value-format="yyyy-M-d"
                      type="date"
                      placeholder="选择日期">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="档案编号" label-width="180px">
                    <el-input v-model="editStaff.dabh"/>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="驾驶证有效截止日期" prop="jszyxjzrq"  label-width="180px">
                    <el-date-picker
                      v-model="editStaff.jszyxjzrq"
                      value-format="yyyy-M-dd"
                      type="date"
                      placeholder="选择日期">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="是否备案" label-width="100px">
                    <el-input v-model="editStaff.sfba"/>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="备案车辆" label-width="100px">
                    <el-input v-model="editStaff.bacl"/>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="备注" label-width="100px">
                    <el-input v-model="editStaff.bz"/>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <el-col>
                  <div style="over-flow: hidden">
                    <el-button style="float: right;margin-right:10px" size="mini" @click="editClick">修改</el-button>
                  </div>
                </el-col>
              </el-row>
            </el-form>
          </el-col>
        </el-row>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import adapter from './adapter'
import imgUpload from '@/components/imgUpload'
export default {
  name: 'staffinfo',
  filters: {
  },
  components: {
    imgUpload,
  },
  data() {
    return {
      ...adapter.data,
      tabIndex: 2, // tab序号
    }
  },
  computed: {
    ...adapter.computed
  },
  created() {
    // 初始化
    this.initPage()
    Promise.all([this.getlistDept(), this.getlistTeam()]).then (() => {
      this.search()
    })
  },
  mounted() {
  },
  methods: {
    ...adapter.methods,
    /**
     * 跳转车辆/员工信息
     */
    jumpInfo(tabIndex) {
      console.log(tabIndex)
      if (tabIndex == 1) {
        this.$router.push('carinfo')
      }
    },
    // 打印图片
    async printPic(code) {
      const printHtml = document.getElementById('printDiv').innerHTML
      const wind = window.open('', 'newwindow', 'height=600, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no')
      // wind.document.title = '结算单'
      wind.document.body.innerHTML = printHtml
      wind.print()
      return false
    },
  }
}
</script>

<style>
/* .addstaffinfo .el-col-6 .el-input--mini .el-input__inner{
  width: 138px;
  margin-left: 10px;
} */
.addstaffinfo .el-col-12 .el-input--mini .el-input__inner{
  width: 317px;
  margin-left: 10px;
}
.addstaffinfo .el-col-8 .el-input--mini .el-input__inner{
  width: 225px;
  margin-left: 10px;
}
.addstaffinfo .el-form-item__label{
  background: #ccc;
  color: #000;
  text-align: center;
  font-weight: normal;
}
</style>
<style lang="scss" scoped>
.el-input-number{
  width: 90px;
}
.car-detail-title{
  font-size: 30px;
  text-align: center;
}
.radios-box{
  padding: 20px 0 10px 20px;
}
</style>

